package net.hiwii.obj.time;

import java.util.Calendar;

public class DateTime extends MonthTime {
	private String day;

	public String getDay() {
		return day;
	}

	public void setDay(String day) {
		this.day = day;
	}

	@Override
	public void init(Calendar cal) {
		setYear(String.valueOf(cal.get(Calendar.YEAR)));
		setMonth(String.format("%02d", cal.get(Calendar.MONTH)+1));
		setDay(String.format("%02d", cal.get(Calendar.DATE)));
	}
	
	@Override
	public String toString() {
		return getYear() + getMonth() + getDay();
	}
}
